package com.testing.class3;

import java.util.Scanner;

public class Homework2 {
    public static void test() {
        Scanner sc =new Scanner(System.in);
        System.out.println("请输入测试的x值：");
//        //获取输入的下个整数值，赋值给x
        int x ;//= sc.nextInt();
//        System.out.println("x=" + x + "时：");
//        System.out.println("----------------先与后或");
//        boolean result = x > 5 && x << 8 - 7 > 20 || !(x++ < 15);
//        System.out.print("x的值是" + x);
//        System.out.println("\t运算结果是" + result);
//        System.out.println("----------------先或后与");
//        x=sc.nextInt();
//        System.out.println("x=" + x + "时：");
//        boolean result1 = x > 5 || x << 8 - 7 > 20 && !(x++ < 15);
//        System.out.print("x的值是" + x);
//        System.out.println("\t运算结果是" + result1);
        System.out.println("----------------调整顺序");
        x = sc.nextInt();
        System.out.println("x=" + x + "时：");
        boolean result2 = x < 5 || !(x++ < 15) && x << 8 - 7 > 20;
        System.out.print("x的值是" + x);
        System.out.println("\t运算结果是" + result2);
    }
}
